From e5253c7bf003a41ceb56c6b6528b8d9d8b2112c1 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Wed, 3 Jun 2015 02:23:18 +0000 Subject: [PATCH] quiet debug messages in garmin_fit fix. --- gpsbabel/garmin_fit.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gpsbabel/garmin_fit.cc b/gpsbabel/garmin_fit.cc index e7b36f864..b1614b30f 100644 --- a/gpsbabel/garmin_fit.cc +++ b/gpsbabel/garmin_fit.cc @@ -265,7 +265,9 @@ fit_read_field(fit_field_t* f) for (i = 0; i < f->size; i++) { fit_getuint8(); } - debug_print(8, "%s: fit_read_field: skipping 1-byte array data\n", MYNAME); + if (global_opts.debug_level >= 8) { + debug_print(8, "%s: fit_read_field: skipping 1-byte array data\n", MYNAME); + } return -1; } case 0x83: // sint16 @@ -276,7 +278,9 @@ fit_read_field(fit_field_t* f) for (i = 0; i < f->size; i++) { fit_getuint8(); } - debug_print(8, "%s: fit_read_field: skipping 2-byte array data\n", MYNAME); + if (global_opts.debug_level >= 8) { + debug_print(8, "%s: fit_read_field: skipping 2-byte array data\n", MYNAME); + } return -1; } case 0x85: // sint32 @@ -287,14 +291,18 @@ fit_read_field(fit_field_t* f) for (i = 0; i < f->size; i++) { fit_getuint8(); } - debug_print(8, "%s: fit_read_field: skipping 4-byte array data\n", MYNAME); + if (global_opts.debug_level >= 8) { + debug_print(8, "%s: fit_read_field: skipping 4-byte array data\n", MYNAME); + } return -1; } default: // Ignore everything else for now. for (i = 0; i < f->size; i++) { fit_getuint8(); } - debug_print(8, "%s: fit_read_field: skipping unrecognized data type\n", MYNAME); + if (global_opts.debug_level >= 8) { + debug_print(8, "%s: fit_read_field: skipping unrecognized data type\n", MYNAME); + } return -1; } } -- 2.30.2